<?php

namespace App\Models;

use Exception;
use Illuminate\Database\Eloquent\Model;
use SoapClient;
use SoapParam;

class Goods extends Model
{
    protected $table ='goods';

    protected $fillable = ['server_id','item_id','count', 'price','cat_id','order'];

    protected $casts = [
//        'price' => 'integer',
    ];

//    public function itemLocale($locale='zhCN'){
//        return $this->hasOne(ItemLocale::class,'ID','item_id')->where('locale',$locale);
//    }

    public function item($locale='zhCN'){
        return $this->hasOne(Item::class,'entry','item_id');
    }
}
